package com.yw.common.core.db.entity;

import com.yw.common.core.entity.IKeyValue;

/**
 * 数据库表字段基类
 * @author aoshiguchen
 * @time 2015-09-11
 */

public abstract class BaseField<T> implements IDataField<T>{
	protected IKeyValue<String,T> field;

	@Override
	public String getFieldName() {
		
		return field.getK();
	}

	@Override
	public T getFieldValue() {
		
		return field.getV();
	}

	@Override
	public void setFieldName(String fieldName) {
		field.setK(fieldName);
	}

	@Override
	public void setFieldValue(T fieldValue) {
		field.setV(fieldValue);
	}

	@Override
	public String toString() {
		return "BaseField [key=" + field.getK() + " value=" + field.getV() +"]";
	}
	
}
